<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-01-27 14:29:17
 * @LastEditTime: 2023-01-09 09:57:12
 * @LastEditors: sunkaiyuan sunkaiyuan@namenode.com
 * @Description: 
 */

namespace App\Http\Controllers\System;


use App\Http\Controllers\Controller;
use App\Models\MenuModel;
use App\Http\Services\System\MenuService;
use App\Http\Services\System\UserService;
use Illuminate\Http\Request;
use Illuminate\Support\Str;

class MenuController extends Controller
{
    public $user_service;
    public function __construct(MenuService $menu_service, UserService $user_service)
    {
        $this->service = $menu_service;
        $this->user_service = $user_service;
    }
    public function list()
    {
        return $this->service->list();
    }
    public function userMenu()
    {
        // return $this->service->userMenu();
        return $this->user_service->menu();
    }

    public function save(Request $request)
    {
        return $this->service->save($request);
    }

    public function delete(Request $request)
    {
        return $this->service->delete($request);
    }
    //根据菜单获取有权限的角色
    public function role(Request $request)
    {
        return $this->service->role($request);
    }

    public function saveSort()
    {
        return $this->service->saveSort();
    }
}